package com.hl.mapper;

import com.hl.pojo.Wenzhang;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface WenzhangMapper {
    //添加文章
    @Update("insert into wenzhang (url,title,text) values (#{url},#{title},#{text})")
    public Integer add(Wenzhang wenzhang);
    //查询所有文章
    @Select("select * from wenzhang")
    public List<Wenzhang> findAll();
    //根据id删除
    @Delete("delete from wenzhang where id = #{id}")
    public Integer del(Wenzhang wenzhang);
}
